|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmontecarlo.Main
public class Main
Program control for replicating the Monte Carlo experiments in Bajari, Hong, and Ryan (2009). The program makes use of a Gridgain computing grid if available; see www.gridgain.com.
The program works in a few simple steps:
The results are reported in a GUI, and consist of three sets of numbers (means, medians, standard deviations, mean bias, median bias, mean absolute deviations, and median absolute deviations):
The primary numbers reported in the paper are drawn from the second set of results. The first set is reported for completeness, as they are used to construct the second set of results. The third set of results is reported as a consistency check on the second set of results. For large enough MCMC chain sizes, the mean of the standard deviations of the LTE chains should be equal to the standard deviations reported in the second set of results. These were calculated for diagnostic purposes, and are not used in the paper, but are kept here for completeness. We use the LTE method from Chernozhukov and Hong (2003) for optimizing each run in the Monte Carlo. The appendix of their paper contains an overview of the algorithm. Newton-based methods are also included and may be used by changing the code in MonteCarloTask.
An overview of the concurrency architecture in Java can be found at java.sun.com.
Field Summary | |
---|---|
static java.text.NumberFormat |
nf
Instance of the localized number formatting utility class. |
static int |
NUM_THREADS
Number of threads to use if not using a Gridgain grid. |
static int |
numParams
Number of parameters. |
static int |
numRuns
Number of Monte Carlo runs to perform. |
static double[] |
trueX
The true values of the primitives. |
static boolean |
useGrid
Boolean indicating whether or not the program should attempt to utilize a Gridgain-based ExecutorService when submitting tasks |
Constructor Summary | |
---|---|
Main()
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
static void |
outputResults(Jama.Matrix x,
javax.swing.JTextArea jt,
int numParams)
A simple utility method for reporting summary statistics from a passed Jama.Matrix object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.text.NumberFormat nf
public static double[] trueX
public static int numParams
public static int numRuns
public static int NUM_THREADS
public static boolean useGrid
Constructor Detail |
---|
public Main()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- the command line argumentspublic static void outputResults(Jama.Matrix x, javax.swing.JTextArea jt, int numParams)
x
- The matrix containing the data to be summarized.jt
- The JTextArea where the resulting information should be sent.numParams
- The number of parameters to be evaluated.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |